package utils.thread;


import com.qingyun.model.user.pojos.User;

public class AppThreadLocalUtil {
    private final static ThreadLocal<User> WM_USER_THREAD_LOCAL =new ThreadLocal<>();

    //存入线程
    public static void setUser(User User) {
        WM_USER_THREAD_LOCAL.set(User);
    }

    //从线程中获取
    public static User getUser(){
        return WM_USER_THREAD_LOCAL.get();
    }

    //清理
    public static void clear(){
        WM_USER_THREAD_LOCAL.remove();
    }
}
